// Knockout JavaScript library v2.1.0beta
// (c) Steven Sanderson - http://knockoutjs.com/
// License: MIT (http://www.opensource.org/licenses/mit-license.php)

(function(window,document,navigator,undefined){
function l(x){throw x;}var m=void 0,p=!0,r=null,t=!1;function B(x){return function(){return x}};function E(x){function C(b,c,d){d&&c!==a.k.r(b)&&a.k.S(b,c);c!==a.k.r(b)&&a.a.va(b,"change")}var a="undefined"!==typeof x?x:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;f<d.length-1;f++)e=e[d[f]];e[d[d.length-1]]=c};a.B=function(a,c,d){a[c]=d};a.version="2.1.0beta";a.b("version",a.version);a.a=new function(){function b(b,f){if("input"!==a.a.o(b)||!b.type||"click"!=f.toLowerCase())return t;var c=b.type;return"checkbox"==c||"radio"==c}var c=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,d={},e={};d[/Firefox\/2/i.test(navigator.userAgent)?
"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"];d.MouseEvents="click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave".split(",");for(var f in d){var h=d[f];if(h.length)for(var g=0,i=h.length;g<i;g++)e[h[g]]=f}var j=function(){for(var a=3,b=document.createElement("div"),f=b.getElementsByTagName("i");b.innerHTML="<\!--[if gt IE "+ ++a+"]><i></i><![endif]--\>",f[0];);return 4<a?a:m}();return{Ca:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],v:function(a,
b){for(var f=0,c=a.length;f<c;f++)b(a[f])},j:function(a,b){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(a,b);for(var f=0,c=a.length;f<c;f++)if(a[f]===b)return f;return-1},ab:function(a,b,f){for(var c=0,e=a.length;c<e;c++)if(b.call(f,a[c]))return a[c];return r},ba:function(b,f){var c=a.a.j(b,f);0<=c&&b.splice(c,1)},za:function(b){for(var b=b||[],f=[],c=0,e=b.length;c<e;c++)0>a.a.j(f,b[c])&&f.push(b[c]);return f},T:function(a,b){for(var a=a||[],f=[],c=0,e=a.length;c<
e;c++)f.push(b(a[c]));return f},aa:function(a,b){for(var a=a||[],f=[],c=0,e=a.length;c<e;c++)b(a[c])&&f.push(a[c]);return f},N:function(a,b){if(b instanceof Array)a.push.apply(a,b);else for(var f=0,c=b.length;f<c;f++)a.push(b[f]);return a},extend:function(a,b){for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);return a},ga:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},Ab:function(b){for(var b=a.a.L(b),f=document.createElement("div"),c=0,e=b.length;c<e;c++)f.appendChild(b[c]);return f},X:function(b,
f){a.a.ga(b);if(f)for(var c=0,e=f.length;c<e;c++)b.appendChild(f[c])},Na:function(b,f){var c=b.nodeType?[b]:b;if(0<c.length){for(var e=c[0],h=e.parentNode,d=0,g=f.length;d<g;d++)h.insertBefore(f[d],e);d=0;for(g=c.length;d<g;d++)a.removeNode(c[d])}},Pa:function(a,b){0<=navigator.userAgent.indexOf("MSIE 6")?a.setAttribute("selected",b):a.selected=b},w:function(a){return(a||"").replace(c,"")},Ib:function(b,f){for(var c=[],e=(b||"").split(f),h=0,d=e.length;h<d;h++){var g=a.a.w(e[h]);""!==g&&c.push(g)}return c},
Hb:function(a,b){a=a||"";return b.length>a.length?t:a.substring(0,b.length)===b},eb:function(a,b){for(var f="return ("+a+")",c=0;c<b;c++)f="with(sc["+c+"]) { "+f+" } ";return new Function("sc",f)},kb:function(a,b){if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a!=r;){if(a==b)return p;a=a.parentNode}return t},fa:function(b){return a.a.kb(b,document)},o:function(a){return a.tagName.toLowerCase()},n:function(a,f,c){if("undefined"!=typeof jQuery){if(b(a,f))var e=c,c=function(a,
b){var f=this.checked;b&&(this.checked=b.fb!==p);e.call(this,a);this.checked=f};jQuery(a).bind(f,c)}else"function"==typeof a.addEventListener?a.addEventListener(f,c,t):"undefined"!=typeof a.attachEvent?a.attachEvent("on"+f,function(b){c.call(a,b)}):l(Error("Browser doesn't support addEventListener or attachEvent"))},va:function(a,f){(!a||!a.nodeType)&&l(Error("element must be a DOM node when calling triggerEvent"));if("undefined"!=typeof jQuery){var c=[];b(a,f)&&c.push({fb:a.checked});jQuery(a).trigger(f,
c)}else"function"==typeof document.createEvent?"function"==typeof a.dispatchEvent?(c=document.createEvent(e[f]||"HTMLEvents"),c.initEvent(f,p,p,window,0,0,0,0,0,t,t,t,t,0,a),a.dispatchEvent(c)):l(Error("The supplied element doesn't support dispatchEvent")):"undefined"!=typeof a.fireEvent?(b(a,f)&&(a.checked=a.checked!==p),a.fireEvent("on"+f)):l(Error("Browser doesn't support triggering events"))},d:function(b){return a.la(b)?b():b},Ua:function(b,f,c){var e=(b.className||"").split(/\s+/),h=0<=a.a.j(e,
f);if(c&&!h)b.className+=(e[0]?" ":"")+f;else if(h&&!c){c="";for(h=0;h<e.length;h++)e[h]!=f&&(c+=e[h]+" ");b.className=a.a.w(c)}},Qa:function(b,f){var c=a.a.d(f);if(c===r||c===m)c="";"innerText"in b?b.innerText=c:b.textContent=c;9<=j&&(b.style.display=b.style.display)},lb:function(a){if(9<=j){var b=a.style.width;a.style.width=0;a.style.width=b}},Eb:function(b,f){for(var b=a.a.d(b),f=a.a.d(f),c=[],e=b;e<=f;e++)c.push(e);return c},L:function(a){for(var b=[],f=0,c=a.length;f<c;f++)b.push(a[f]);return b},
tb:6===j,ub:7===j,ja:j,Da:function(b,f){for(var c=a.a.L(b.getElementsByTagName("input")).concat(a.a.L(b.getElementsByTagName("textarea"))),e="string"==typeof f?function(a){return a.name===f}:function(a){return f.test(a.name)},h=[],d=c.length-1;0<=d;d--)e(c[d])&&h.push(c[d]);return h},Bb:function(b){return"string"==typeof b&&(b=a.a.w(b))?window.JSON&&window.JSON.parse?window.JSON.parse(b):(new Function("return "+b))():r},sa:function(b,f,c){("undefined"==typeof JSON||"undefined"==typeof JSON.stringify)&&
l(Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js"));return JSON.stringify(a.a.d(b),f,c)},Cb:function(b,f,c){var c=c||{},e=c.params||{},h=c.includeFields||this.Ca,d=b;if("object"==typeof b&&"form"===a.a.o(b))for(var d=b.action,g=h.length-1;0<=g;g--)for(var j=a.a.Da(b,h[g]),i=j.length-1;0<=i;i--)e[j[i].name]=j[i].value;var f=a.a.d(f),w=document.createElement("form");
w.style.display="none";w.action=d;w.method="post";for(var z in f)b=document.createElement("input"),b.name=z,b.value=a.a.sa(a.a.d(f[z])),w.appendChild(b);for(z in e)b=document.createElement("input"),b.name=z,b.value=e[z],w.appendChild(b);document.body.appendChild(w);c.submitter?c.submitter(w):w.submit();setTimeout(function(){w.parentNode.removeChild(w)},0)}}};a.b("utils",a.a);a.b("utils.arrayForEach",a.a.v);a.b("utils.arrayFirst",a.a.ab);a.b("utils.arrayFilter",a.a.aa);a.b("utils.arrayGetDistinctValues",
a.a.za);a.b("utils.arrayIndexOf",a.a.j);a.b("utils.arrayMap",a.a.T);a.b("utils.arrayPushAll",a.a.N);a.b("utils.arrayRemoveItem",a.a.ba);a.b("utils.extend",a.a.extend);a.b("utils.fieldsIncludedWithJsonPost",a.a.Ca);a.b("utils.getFormFields",a.a.Da);a.b("utils.postJson",a.a.Cb);a.b("utils.parseJson",a.a.Bb);a.b("utils.registerEventHandler",a.a.n);a.b("utils.stringifyJson",a.a.sa);a.b("utils.range",a.a.Eb);a.b("utils.toggleDomNodeCssClass",a.a.Ua);a.b("utils.triggerEvent",a.a.va);a.b("utils.unwrapObservable",
a.a.d);Function.prototype.bind||(Function.prototype.bind=function(a){var c=this,d=Array.prototype.slice.call(arguments),a=d.shift();return function(){return c.apply(a,d.concat(Array.prototype.slice.call(arguments)))}});a.a.f=new function(){var b=0,c="__ko__"+(new Date).getTime(),d={};return{get:function(b,f){var c=a.a.f.getAll(b,t);return c===m?m:c[f]},set:function(b,f,c){c===m&&a.a.f.getAll(b,t)===m||(a.a.f.getAll(b,p)[f]=c)},getAll:function(a,f){var h=a[c];if(!(h&&"null"!==h)){if(!f)return;h=a[c]=
"ko"+b++;d[h]={}}return d[h]},clear:function(a){var b=a[c];b&&(delete d[b],a[c]=r)}}};a.b("utils.domData",a.a.f);a.b("utils.domData.clear",a.a.f.clear);a.a.F=new function(){function b(b,c){var f=a.a.f.get(b,d);f===m&&c&&(f=[],a.a.f.set(b,d,f));return f}function c(e){var d=b(e,t);if(d)for(var d=d.slice(0),i=0;i<d.length;i++)d[i](e);a.a.f.clear(e);"function"==typeof jQuery&&"function"==typeof jQuery.cleanData&&jQuery.cleanData([e]);if(f[e.nodeType])for(d=e.firstChild;e=d;)d=e.nextSibling,8===e.nodeType&&
c(e)}var d="__ko_domNodeDisposal__"+(new Date).getTime(),e={1:p,8:p,9:p},f={1:p,9:p};return{wa:function(a,c){"function"!=typeof c&&l(Error("Callback must be a function"));b(a,p).push(c)},Ma:function(c,f){var e=b(c,t);e&&(a.a.ba(e,f),0==e.length&&a.a.f.set(c,d,m))},J:function(b){if(e[b.nodeType]&&(c(b),f[b.nodeType])){var d=[];a.a.N(d,b.getElementsByTagName("*"));for(var b=0,i=d.length;b<i;b++)c(d[b])}},removeNode:function(b){a.J(b);b.parentNode&&b.parentNode.removeChild(b)}}};a.J=a.a.F.J;a.removeNode=
a.a.F.removeNode;a.b("cleanNode",a.J);a.b("removeNode",a.removeNode);a.b("utils.domNodeDisposal",a.a.F);a.b("utils.domNodeDisposal.addDisposeCallback",a.a.F.wa);a.b("utils.domNodeDisposal.removeDisposeCallback",a.a.F.Ma);(function(){a.a.pa=function(b){var c;if("undefined"!=typeof jQuery){if((c=jQuery.clean([b]))&&c[0]){for(b=c[0];b.parentNode&&11!==b.parentNode.nodeType;)b=b.parentNode;b.parentNode&&b.parentNode.removeChild(b)}}else{var d=a.a.w(b).toLowerCase();c=document.createElement("div");d=d.match(/^<(thead|tbody|tfoot)/)&&
[1,"<table>","</table>"]||!d.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!d.indexOf("<td")||!d.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||[0,"",""];b="ignored<div>"+d[1]+b+d[2]+"</div>";for("function"==typeof window.innerShiv?c.appendChild(window.innerShiv(b)):c.innerHTML=b;d[0]--;)c=c.lastChild;c=a.a.L(c.lastChild.childNodes)}return c};a.a.Y=function(b,c){a.a.ga(b);if(c!==r&&c!==m)if("string"!=typeof c&&(c=c.toString()),"undefined"!=typeof jQuery)jQuery(b).html(c);
else for(var d=a.a.pa(c),e=0;e<d.length;e++)b.appendChild(d[e])}})();a.b("utils.parseHtmlFragment",a.a.pa);a.b("utils.setHtml",a.a.Y);a.s=function(){function b(){return(4294967296*(1+Math.random())|0).toString(16).substring(1)}function c(b,f){if(b)if(8==b.nodeType){var d=a.s.Ja(b.nodeValue);d!=r&&f.push({jb:b,yb:d})}else if(1==b.nodeType)for(var d=0,g=b.childNodes,i=g.length;d<i;d++)c(g[d],f)}var d={};return{na:function(a){"function"!=typeof a&&l(Error("You can only pass a function to ko.memoization.memoize()"));
var c=b()+b();d[c]=a;return"<\!--[ko_memo:"+c+"]--\>"},Va:function(a,b){var c=d[a];c===m&&l(Error("Couldn't find any memo with ID "+a+". Perhaps it's already been unmemoized."));try{return c.apply(r,b||[]),p}finally{delete d[a]}},Wa:function(b,f){var d=[];c(b,d);for(var g=0,i=d.length;g<i;g++){var j=d[g].jb,k=[j];f&&a.a.N(k,f);a.s.Va(d[g].yb,k);j.nodeValue="";j.parentNode&&j.parentNode.removeChild(j)}},Ja:function(a){return(a=a.match(/^\[ko_memo\:(.*?)\]$/))?a[1]:r}}}();a.b("memoization",a.s);a.b("memoization.memoize",
a.s.na);a.b("memoization.unmemoize",a.s.Va);a.b("memoization.parseMemoText",a.s.Ja);a.b("memoization.unmemoizeDomNodeAndDescendants",a.s.Wa);a.Ba={throttle:function(b,c){b.throttleEvaluation=c;var d=r;return a.h({read:b,write:function(a){clearTimeout(d);d=setTimeout(function(){b(a)},c)}})},notify:function(b,c){b.equalityComparer="always"==c?B(t):a.m.fn.equalityComparer;return b}};a.b("extenders",a.Ba);a.Sa=function(b,c,d){this.target=b;this.ca=c;this.ib=d;a.B(this,"dispose",this.A)};a.Sa.prototype.A=
function(){this.sb=p;this.ib()};a.R=function(){this.u={};a.a.extend(this,a.R.fn);a.B(this,"subscribe",this.ta);a.B(this,"extend",this.extend);a.B(this,"getSubscriptionsCount",this.ob)};a.R.fn={ta:function(b,c,d){var d=d||"change",b=c?b.bind(c):b,e=new a.Sa(this,b,function(){a.a.ba(this.u[d],e)}.bind(this));this.u[d]||(this.u[d]=[]);this.u[d].push(e);return e},notifySubscribers:function(b,c){c=c||"change";this.u[c]&&a.a.v(this.u[c].slice(0),function(a){a&&a.sb!==p&&a.ca(b)})},ob:function(){var a=0,
c;for(c in this.u)this.u.hasOwnProperty(c)&&(a+=this.u[c].length);return a},extend:function(b){var c=this;if(b)for(var d in b){var e=a.Ba[d];"function"==typeof e&&(c=e(c,b[d]))}return c}};a.Ga=function(a){return"function"==typeof a.ta&&"function"==typeof a.notifySubscribers};a.b("subscribable",a.R);a.b("isSubscribable",a.Ga);a.U=function(){var b=[];return{bb:function(a){b.push({ca:a,Aa:[]})},end:function(){b.pop()},La:function(c){a.Ga(c)||l(Error("Only subscribable things can act as dependencies"));
if(0<b.length){var d=b[b.length-1];0<=a.a.j(d.Aa,c)||(d.Aa.push(c),d.ca(c))}}}}();var G={undefined:p,"boolean":p,number:p,string:p};a.m=function(b){function c(){if(0<arguments.length){if(!c.equalityComparer||!c.equalityComparer(d,arguments[0]))c.H(),d=arguments[0],c.G();return this}a.U.La(c);return d}var d=b;a.R.call(c);c.G=function(){c.notifySubscribers(d)};c.H=function(){c.notifySubscribers(d,"beforeChange")};a.a.extend(c,a.m.fn);a.B(c,"valueHasMutated",c.G);a.B(c,"valueWillMutate",c.H);return c};
a.m.fn={equalityComparer:function(a,c){return a===r||typeof a in G?a===c:t}};var A=a.m.Db="__ko_proto__";a.m.fn[A]=a.m;a.ia=function(b,c){return b===r||b===m||b[A]===m?t:b[A]===c?p:a.ia(b[A],c)};a.la=function(b){return a.ia(b,a.m)};a.Ha=function(b){return"function"==typeof b&&b[A]===a.m||"function"==typeof b&&b[A]===a.h&&b.pb?p:t};a.b("observable",a.m);a.b("isObservable",a.la);a.b("isWriteableObservable",a.Ha);a.Q=function(b){0==arguments.length&&(b=[]);b!==r&&b!==m&&!("length"in b)&&l(Error("The argument passed when initializing an observable array must be an array, or null, or undefined."));
var c=a.m(b);a.a.extend(c,a.Q.fn);return c};a.Q.fn={remove:function(a){for(var c=this(),d=[],e="function"==typeof a?a:function(c){return c===a},f=0;f<c.length;f++){var h=c[f];e(h)&&(0===d.length&&this.H(),d.push(h),c.splice(f,1),f--)}d.length&&this.G();return d},removeAll:function(b){if(b===m){var c=this(),d=c.slice(0);this.H();c.splice(0,c.length);this.G();return d}return!b?[]:this.remove(function(c){return 0<=a.a.j(b,c)})},destroy:function(a){var c=this(),d="function"==typeof a?a:function(c){return c===
a};this.H();for(var e=c.length-1;0<=e;e--)d(c[e])&&(c[e]._destroy=p);this.G()},destroyAll:function(b){return b===m?this.destroy(B(p)):!b?[]:this.destroy(function(c){return 0<=a.a.j(b,c)})},indexOf:function(b){var c=this();return a.a.j(c,b)},replace:function(a,c){var d=this.indexOf(a);0<=d&&(this.H(),this()[d]=c,this.G())}};a.a.v("pop,push,reverse,shift,sort,splice,unshift".split(","),function(b){a.Q.fn[b]=function(){var a=this();this.H();a=a[b].apply(a,arguments);this.G();return a}});a.a.v(["slice"],
function(b){a.Q.fn[b]=function(){var a=this();return a[b].apply(a,arguments)}});a.b("observableArray",a.Q);a.h=function(b,c,d){function e(){a.a.v(v,function(a){a.A()});v=[]}function f(){var a=g.throttleEvaluation;a&&0<=a?(clearTimeout(w),w=setTimeout(h,a)):h()}function h(){if(!n)if(k&&x())u();else{n=p;try{var b=a.a.T(v,function(a){return a.target});a.U.bb(function(c){var e;0<=(e=a.a.j(b,c))?b[e]=m:v.push(c.ta(f))});for(var e=o.call(c),d=b.length-1;0<=d;d--)b[d]&&v.splice(d,1)[0].A();k=p;g.notifySubscribers(j,
"beforeChange");j=e}finally{a.U.end()}g.notifySubscribers(j);n=t}}function g(){if(0<arguments.length)i.apply(g,arguments);else return k||h(),a.U.La(g),j}function i(){"function"===typeof s?s.apply(c,arguments):l(Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters."))}var j,k=t,n=t,o=b;o&&"object"==typeof o?(d=o,o=d.read):(d=d||{},o||(o=d.read));"function"!=typeof o&&l(Error("Pass a function that returns the value of the ko.computed"));
var s=d.write;c||(c=d.owner);var v=[],u=e,q="object"==typeof d.disposeWhenNodeIsRemoved?d.disposeWhenNodeIsRemoved:r,x=d.disposeWhen||B(t);if(q){u=function(){a.a.F.Ma(q,arguments.callee);e()};a.a.F.wa(q,u);var y=x,x=function(){return!a.a.fa(q)||y()}}var w=r;g.nb=function(){return v.length};g.pb="function"===typeof d.write;g.A=function(){u()};a.R.call(g);a.a.extend(g,a.h.fn);d.deferEvaluation!==p&&h();a.B(g,"dispose",g.A);a.B(g,"getDependenciesCount",g.nb);return g};a.rb=function(b){return a.ia(b,
a.h)};x=a.m.Db;a.h[x]=a.m;a.h.fn={};a.h.fn[x]=a.h;a.b("dependentObservable",a.h);a.b("computed",a.h);a.b("isComputed",a.rb);(function(){function b(a,f,h){h=h||new d;a=f(a);if(!("object"==typeof a&&a!==r&&a!==m&&!(a instanceof Date)))return a;var g=a instanceof Array?[]:{};h.save(a,g);c(a,function(c){var d=f(a[c]);switch(typeof d){case "boolean":case "number":case "string":case "function":g[c]=d;break;case "object":case "undefined":var k=h.get(d);g[c]=k!==m?k:b(d,f,h)}});return g}function c(a,b){if(a instanceof
Array){for(var c=0;c<a.length;c++)b(c);"function"==typeof a.toJSON&&b("toJSON")}else for(c in a)b(c)}function d(){var b=[],c=[];this.save=function(d,g){var i=a.a.j(b,d);0<=i?c[i]=g:(b.push(d),c.push(g))};this.get=function(d){d=a.a.j(b,d);return 0<=d?c[d]:m}}a.Ta=function(c){0==arguments.length&&l(Error("When calling ko.toJS, pass the object you want to convert."));return b(c,function(b){for(var c=0;a.la(b)&&10>c;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.Ta(b);return a.a.sa(b,c,d)}})();a.b("toJS",
a.Ta);a.b("toJSON",a.toJSON);(function(){a.k={r:function(b){switch(a.a.o(b)){case "option":return b.__ko__hasDomDataOptionValue__===p?a.a.f.get(b,a.c.options.oa):b.getAttribute("value");case "select":return 0<=b.selectedIndex?a.k.r(b.options[b.selectedIndex]):m;default:return b.value}},S:function(b,c){switch(a.a.o(b)){case "option":switch(typeof c){case "string":a.a.f.set(b,a.c.options.oa,m);"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__;b.value=c;break;default:a.a.f.set(b,
a.c.options.oa,c),b.__ko__hasDomDataOptionValue__=p,b.value="number"===typeof c?c:""}break;case "select":for(var d=b.options.length-1;0<=d;d--)if(a.k.r(b.options[d])==c){b.selectedIndex=d;break}break;default:if(c===r||c===m)c="";b.value=c}}}})();a.b("selectExtensions",a.k);a.b("selectExtensions.readValue",a.k.r);a.b("selectExtensions.writeValue",a.k.S);a.g=function(){function b(a,b){for(var d=r;a!=d;)d=a,a=a.replace(c,function(a,c){return b[c]});return a}var c=/\@ko_token_(\d+)\@/g,d=/^[\_$a-z][\_$a-z0-9]*(\[.*?\])*(\.[\_$a-z][\_$a-z0-9]*(\[.*?\])*)*$/i,
e=["true","false"];return{D:[],W:function(c){var d=a.a.w(c);if(3>d.length)return[];"{"===d.charAt(0)&&(d=d.substring(1,d.length-1));for(var c=[],e=r,i,j=0;j<d.length;j++){var k=d.charAt(j);if(e===r)switch(k){case '"':case "'":case "/":e=j,i=k}else if(k==i&&"\\"!==d.charAt(j-1)){k=d.substring(e,j+1);c.push(k);var n="@ko_token_"+(c.length-1)+"@",d=d.substring(0,e)+n+d.substring(j+1),j=j-(k.length-n.length),e=r}}i=e=r;for(var o=0,s=r,j=0;j<d.length;j++){k=d.charAt(j);if(e===r)switch(k){case "{":e=j;
s=k;i="}";break;case "(":e=j;s=k;i=")";break;case "[":e=j,s=k,i="]"}k===s?o++:k===i&&(o--,0===o&&(k=d.substring(e,j+1),c.push(k),n="@ko_token_"+(c.length-1)+"@",d=d.substring(0,e)+n+d.substring(j+1),j-=k.length-n.length,e=r))}i=[];d=d.split(",");e=0;for(j=d.length;e<j;e++)o=d[e],s=o.indexOf(":"),0<s&&s<o.length-1?(k=o.substring(s+1),i.push({key:b(o.substring(0,s),c),value:b(k,c)})):i.push({unknown:b(o,c)});return i},ka:function(b){for(var c="string"===typeof b?a.g.W(b):b,g=[],b=[],i,j=0;i=c[j];j++)if(0<
g.length&&g.push(","),i.key){var k;a:{k=i.key;var n=a.a.w(k);switch(n.length&&n.charAt(0)){case "'":case '"':break a;default:k="'"+n+"'"}}i=i.value;g.push(k);g.push(":");g.push(i);n=a.a.w(i);if(0<=a.a.j(e,a.a.w(n).toLowerCase())?0:n.match(d)!==r)0<b.length&&b.push(", "),b.push(k+" : function(__ko_value) { "+i+" = __ko_value; }")}else i.unknown&&g.push(i.unknown);c=g.join("");0<b.length&&(c=c+", '_ko_property_writers' : { "+b.join("")+" } ");return c},wb:function(b,c){for(var d=0;d<b.length;d++)if(a.a.w(b[d].key)==
c)return p;return t},$:function(b,c,d,e,j){if(!b||!a.Ha(b)){if((b=c()._ko_property_writers)&&b[d])b[d](e)}else(!j||b()!==e)&&b(e)}}}();a.b("jsonExpressionRewriting",a.g);a.b("jsonExpressionRewriting.bindingRewriteValidators",a.g.D);a.b("jsonExpressionRewriting.parseObjectLiteral",a.g.W);a.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",a.g.ka);(function(){function b(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(h)}function c(a){return 8==a.nodeType&&(f?a.text:a.nodeValue).match(g)}
function d(a,d){for(var f=a,e=1,g=[];f=f.nextSibling;){if(c(f)&&(e--,0===e))return g;g.push(f);b(f)&&e++}d||l(Error("Cannot find closing comment tag to match: "+a.nodeValue));return r}function e(a,b){var c=d(a,b);return c?0<c.length?c[c.length-1].nextSibling:a.nextSibling:r}var f="<\!--test--\>"===document.createComment("test").text,h=f?/^<\!--\s*ko\s+(.*\:.*)\s*--\>$/:/^\s*ko\s+(.*\:.*)\s*$/,g=f?/^<\!--\s*\/ko\s*--\>$/:/^\s*\/ko\s*$/,i={ul:p,ol:p};a.e={C:{},childNodes:function(a){return b(a)?d(a):
a.childNodes},ha:function(c){if(b(c))for(var c=a.e.childNodes(c),d=0,f=c.length;d<f;d++)a.removeNode(c[d]);else a.a.ga(c)},X:function(c,d){if(b(c)){a.e.ha(c);for(var f=c.nextSibling,e=0,g=d.length;e<g;e++)f.parentNode.insertBefore(d[e],f)}else a.a.X(c,d)},Ka:function(a,c){b(a)?a.parentNode.insertBefore(c,a.nextSibling):a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)},Fa:function(a,c,d){b(a)?a.parentNode.insertBefore(c,d.nextSibling):d.nextSibling?a.insertBefore(c,d.nextSibling):a.appendChild(c)},
firstChild:function(a){return!b(a)?a.firstChild:!a.nextSibling||c(a.nextSibling)?r:a.nextSibling},nextSibling:function(a){b(a)&&(a=e(a));return a.nextSibling&&c(a.nextSibling)?r:a.nextSibling},Xa:function(a){return(a=b(a))?a[1]:r},Ia:function(d){if(i[a.a.o(d)]){var f=d.firstChild;if(f){do if(1===f.nodeType){var g;g=f.firstChild;var h=r;if(g){do if(h)h.push(g);else if(b(g)){var s=e(g,p);s?g=s:h=[g]}else c(g)&&(h=[g]);while(g=g.nextSibling)}if(g=h){h=f.nextSibling;for(s=0;s<g.length;s++)h?d.insertBefore(g[s],
h):d.appendChild(g[s])}}while(f=f.nextSibling)}}}}})();a.b("virtualElements",a.e);a.b("virtualElements.allowedBindings",a.e.C);a.b("virtualElements.emptyNode",a.e.ha);a.b("virtualElements.insertAfter",a.e.Fa);a.b("virtualElements.prepend",a.e.Ka);a.b("virtualElements.setDomNodeChildren",a.e.X);(function(){a.I=function(){this.cb={}};a.a.extend(a.I.prototype,{nodeHasBindings:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind")!=r;case 8:return a.e.Xa(b)!=r;default:return t}},getBindings:function(a,
c){var d=this.getBindingsString(a,c);return d?this.parseBindingsString(d,c):r},getBindingsString:function(b){switch(b.nodeType){case 1:return b.getAttribute("data-bind");case 8:return a.e.Xa(b);default:return r}},parseBindingsString:function(b,c){try{var d=c.$data,d="object"==typeof d&&d!=r?[d,c]:[c],e=d.length,f=this.cb,h=e+"_"+b,g;if(!(g=f[h])){var i=" { "+a.g.ka(b)+" } ";g=f[h]=a.a.eb(i,e)}return g(d)}catch(j){l(Error("Unable to parse bindings.\nMessage: "+j+";\nBindings value: "+b))}}});a.I.instance=
new a.I})();a.b("bindingProvider",a.I);(function(){function b(b,d,h){for(var g=a.e.firstChild(d);d=g;)g=a.e.nextSibling(d),c(b,d,h)}function c(c,f,h){var g=p,i=1===f.nodeType;i&&a.e.Ia(f);if(i&&h||a.I.instance.nodeHasBindings(f))g=d(f,r,c,h).Gb;g&&b(c,f,!i)}function d(b,c,d,g){function i(a){return function(){return n[a]}}function j(){return n}var k=0,n,o;a.h(function(){var s=d&&d instanceof a.z?d:new a.z(a.a.d(d)),v=s.$data;g&&a.Ra(b,s);if(n=("function"==typeof c?c():c)||a.I.instance.getBindings(b,
s)){if(0===k){k=1;for(var u in n){var q=a.c[u];q&&8===b.nodeType&&!a.e.C[u]&&l(Error("The binding '"+u+"' cannot be used with virtual elements"));if(q&&"function"==typeof q.init&&(q=(0,q.init)(b,i(u),j,v,s))&&q.controlsDescendantBindings)o!==m&&l(Error("Multiple bindings ("+o+" and "+u+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.")),o=u}k=2}if(2===k)for(u in n)(q=a.c[u])&&"function"==typeof q.update&&(0,q.update)(b,i(u),
j,v,s)}},r,{disposeWhenNodeIsRemoved:b});return{Gb:o===m}}a.c={};a.z=function(b,c){c?(a.a.extend(this,c),this.$parentContext=c,this.$parent=c.$data,this.$parents=(c.$parents||[]).slice(0),this.$parents.unshift(this.$parent)):(this.$parents=[],this.$root=b);this.$data=b};a.z.prototype.createChildContext=function(b){return new a.z(b,this)};a.z.prototype.extend=function(b){var c=a.a.extend(new a.z,this);return a.a.extend(c,b)};a.Ra=function(b,c){if(2==arguments.length)a.a.f.set(b,"__ko_bindingContext__",
c);else return a.a.f.get(b,"__ko_bindingContext__")};a.ya=function(b,c,h){1===b.nodeType&&a.e.Ia(b);return d(b,c,h,p)};a.Ya=function(a,c){(1===c.nodeType||8===c.nodeType)&&b(a,c,p)};a.xa=function(a,b){b&&1!==b.nodeType&&8!==b.nodeType&&l(Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"));b=b||window.document.body;c(a,b,p)};a.ea=function(b){switch(b.nodeType){case 1:case 8:var c=a.Ra(b);if(c)return c;if(b.parentNode)return a.ea(b.parentNode)}};
a.hb=function(b){return(b=a.ea(b))?b.$data:m};a.b("bindingHandlers",a.c);a.b("applyBindings",a.xa);a.b("applyBindingsToDescendants",a.Ya);a.b("applyBindingsToNode",a.ya);a.b("contextFor",a.ea);a.b("dataFor",a.hb)})();a.a.v(["click"],function(b){a.c[b]={init:function(c,d,e,f){return a.c.event.init.call(this,c,function(){var a={};a[b]=d();return a},e,f)}}});a.c.event={init:function(b,c,d,e){var f=c()||{},h;for(h in f)(function(){var f=h;"string"==typeof f&&a.a.n(b,f,function(b){var h,k=c()[f];if(k){var n=
d();try{var o=a.a.L(arguments);o.unshift(e);h=k.apply(e,o)}finally{h!==p&&(b.preventDefault?b.preventDefault():b.returnValue=t)}n[f+"Bubble"]===t&&(b.cancelBubble=p,b.stopPropagation&&b.stopPropagation())}})})()}};a.c.submit={init:function(b,c,d,e){"function"!=typeof c()&&l(Error("The value for a submit binding must be a function"));a.a.n(b,"submit",function(a){var d,g=c();try{d=g.call(e,b)}finally{d!==p&&(a.preventDefault?a.preventDefault():a.returnValue=t)}})}};a.c.visible={update:function(b,c){var d=
a.a.d(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};a.c.enable={update:function(b,c){var d=a.a.d(c());d&&b.disabled?b.removeAttribute("disabled"):!d&&!b.disabled&&(b.disabled=p)}};a.c.disable={update:function(b,c){a.c.enable.update(b,function(){return!a.a.d(c())})}};a.c.value={init:function(b,c,d){function e(){var f=c(),e=a.k.r(b);a.g.$(f,d,"value",e,p)}var f=["change"],h=d().valueUpdate;h&&("string"==typeof h&&(h=[h]),a.a.N(f,h),f=a.a.za(f));if(a.a.ja&&
"input"==b.tagName.toLowerCase()&&"text"==b.type&&"off"!=b.autocomplete&&(!b.form||"off"!=b.form.autocomplete)&&-1==a.a.j(f,"propertychange")){var g=t;a.a.n(b,"propertychange",function(){g=p});a.a.n(b,"blur",function(){if(g){g=t;e()}})}a.a.v(f,function(c){var d=e;if(a.a.Hb(c,"after")){d=function(){setTimeout(e,0)};c=c.substring(5)}a.a.n(b,c,d)})},update:function(b,c){var d="select"===a.a.o(b),e=a.a.d(c()),f=a.k.r(b),h=e!=f;0===e&&0!==f&&"0"!==f&&(h=p);h&&(f=function(){a.k.S(b,e)},f(),d&&setTimeout(f,
0));d&&0<b.length&&C(b,e,t)}};a.c.options={update:function(b,c,d){"select"!==a.a.o(b)&&l(Error("options binding applies only to SELECT elements"));for(var e=0==b.length,f=a.a.T(a.a.aa(b.childNodes,function(b){return b.tagName&&"option"===a.a.o(b)&&b.selected}),function(b){return a.k.r(b)||b.innerText||b.textContent}),h=b.scrollTop,g=a.a.d(c());0<b.length;)a.J(b.options[0]),b.remove(0);if(g){d=d();"number"!=typeof g.length&&(g=[g]);if(d.optionsCaption){var i=document.createElement("option");a.a.Y(i,
d.optionsCaption);a.k.S(i,m);b.appendChild(i)}for(var c=0,j=g.length;c<j;c++){var i=document.createElement("option"),k="string"==typeof d.optionsValue?g[c][d.optionsValue]:g[c],k=a.a.d(k);a.k.S(i,k);var n=d.optionsText,k="function"==typeof n?n(g[c]):"string"==typeof n?g[c][n]:k;if(k===r||k===m)k="";a.a.Qa(i,k);b.appendChild(i)}g=b.getElementsByTagName("option");c=i=0;for(j=g.length;c<j;c++)0<=a.a.j(f,a.k.r(g[c]))&&(a.a.Pa(g[c],p),i++);b.scrollTop=h;e&&"value"in d&&C(b,a.a.d(d.value),p);a.a.lb(b)}}};
a.c.options.oa="__ko.optionValueDomData__";a.c.selectedOptions={Ea:function(b){for(var c=[],b=b.childNodes,d=0,e=b.length;d<e;d++){var f=b[d],h=a.a.o(f);"option"==h&&f.selected?c.push(a.k.r(f)):"optgroup"==h&&(f=a.c.selectedOptions.Ea(f),Array.prototype.splice.apply(c,[c.length,0].concat(f)))}return c},init:function(b,c,d){a.a.n(b,"change",function(){var b=c(),f=a.c.selectedOptions.Ea(this);a.g.$(b,d,"value",f)})},update:function(b,c){"select"!=a.a.o(b)&&l(Error("values binding applies only to SELECT elements"));
var d=a.a.d(c());if(d&&"number"==typeof d.length)for(var e=b.childNodes,f=0,h=e.length;f<h;f++){var g=e[f];"option"===a.a.o(g)&&a.a.Pa(g,0<=a.a.j(d,a.k.r(g)))}}};a.c.text={update:function(b,c){a.a.Qa(b,c())}};a.c.html={init:function(){return{controlsDescendantBindings:p}},update:function(b,c){var d=a.a.d(c());a.a.Y(b,d)}};a.c.css={update:function(b,c){var d=a.a.d(c()||{}),e;for(e in d)if("string"==typeof e){var f=a.a.d(d[e]);a.a.Ua(b,e,f)}}};a.c.style={update:function(b,c){var d=a.a.d(c()||{}),e;
for(e in d)if("string"==typeof e){var f=a.a.d(d[e]);b.style[e]=f||""}}};a.c.uniqueName={init:function(b,c){c()&&(b.name="ko_unique_"+ ++a.c.uniqueName.gb,(a.a.tb||a.a.ub)&&b.mergeAttributes(document.createElement("<input name='"+b.name+"'/>"),t))}};a.c.uniqueName.gb=0;a.c.checked={init:function(b,c,d){a.a.n(b,"click",function(){var e;if("checkbox"==b.type)e=b.checked;else if("radio"==b.type&&b.checked)e=b.value;else return;var f=c();"checkbox"==b.type&&a.a.d(f)instanceof Array?(e=a.a.j(a.a.d(f),b.value),
b.checked&&0>e?f.push(b.value):!b.checked&&0<=e&&f.splice(e,1)):a.g.$(f,d,"checked",e,p)});"radio"==b.type&&!b.name&&a.c.uniqueName.init(b,B(p))},update:function(b,c){var d=a.a.d(c());"checkbox"==b.type?b.checked=d instanceof Array?0<=a.a.j(d,b.value):d:"radio"==b.type&&(b.checked=b.value==d)}};var F={"class":"className","for":"htmlFor"};a.c.attr={update:function(b,c){var d=a.a.d(c())||{},e;for(e in d)if("string"==typeof e){var f=a.a.d(d[e]),h=f===t||f===r||f===m;h&&b.removeAttribute(e);8>=a.a.ja&&
e in F?(e=F[e],h?b.removeAttribute(e):b[e]=f):h||b.setAttribute(e,f.toString())}}};a.c.hasfocus={init:function(b,c,d){function e(b){var e=c();a.g.$(e,d,"hasfocus",b,p)}a.a.n(b,"focus",function(){e(p)});a.a.n(b,"focusin",function(){e(p)});a.a.n(b,"blur",function(){e(t)});a.a.n(b,"focusout",function(){e(t)})},update:function(b,c){var d=a.a.d(c());d?b.focus():b.blur();a.a.va(b,d?"focusin":"focusout")}};a.c["with"]={p:function(b){return function(){var c=b();return{"if":c,data:c,templateEngine:a.q.K}}},
init:function(b,c){return a.c.template.init(b,a.c["with"].p(c))},update:function(b,c,d,e,f){return a.c.template.update(b,a.c["with"].p(c),d,e,f)}};a.g.D["with"]=t;a.e.C["with"]=p;a.c["if"]={p:function(b){return function(){return{"if":b(),templateEngine:a.q.K}}},init:function(b,c){return a.c.template.init(b,a.c["if"].p(c))},update:function(b,c,d,e,f){return a.c.template.update(b,a.c["if"].p(c),d,e,f)}};a.g.D["if"]=t;a.e.C["if"]=p;a.c.ifnot={p:function(b){return function(){return{ifnot:b(),templateEngine:a.q.K}}},
init:function(b,c){return a.c.template.init(b,a.c.ifnot.p(c))},update:function(b,c,d,e,f){return a.c.template.update(b,a.c.ifnot.p(c),d,e,f)}};a.g.D.ifnot=t;a.e.C.ifnot=p;a.c.foreach={p:function(b){return function(){var c=a.a.d(b());return!c||"number"==typeof c.length?{foreach:c,templateEngine:a.q.K}:{foreach:c.data,includeDestroyed:c.includeDestroyed,afterAdd:c.afterAdd,beforeRemove:c.beforeRemove,afterRender:c.afterRender,templateEngine:a.q.K}}},init:function(b,c){return a.c.template.init(b,a.c.foreach.p(c))},
update:function(b,c,d,e,f){return a.c.template.update(b,a.c.foreach.p(c),d,e,f)}};a.g.D.foreach=t;a.e.C.foreach=p;a.t=function(){};a.t.prototype.renderTemplateSource=function(){l(Error("Override renderTemplateSource"))};a.t.prototype.createJavaScriptEvaluatorBlock=function(){l(Error("Override createJavaScriptEvaluatorBlock"))};a.t.prototype.makeTemplateSource=function(b){if("string"==typeof b){var c=document.getElementById(b);c||l(Error("Cannot find template with ID "+b));return new a.l.i(c)}if(1==
b.nodeType||8==b.nodeType)return new a.l.M(b);l(Error("Unknown template type: "+b))};a.t.prototype.renderTemplate=function(a,c,d){return this.renderTemplateSource(this.makeTemplateSource(a),c,d)};a.t.prototype.isTemplateRewritten=function(a){return this.allowTemplateRewriting===t||this.V&&this.V[a]?p:this.makeTemplateSource(a).data("isRewritten")};a.t.prototype.rewriteTemplate=function(a,c){var d=this.makeTemplateSource(a),e=c(d.text());d.text(e);d.data("isRewritten",p);"string"==typeof a&&(this.V=
this.V||{},this.V[a]=p)};a.b("templateEngine",a.t);a.Z=function(){function b(b,c,d){for(var b=a.g.W(b),g=a.g.D,i=0;i<b.length;i++){var j=b[i].key;if(g.hasOwnProperty(j)){var k=g[j];"function"===typeof k?(j=k(b[i].value))&&l(Error(j)):k||l(Error("This template engine does not support the '"+j+"' binding within its templates"))}}b="ko.templateRewriting.applyMemoizedBindingsToNextSibling(function() {             return (function() { return { "+a.g.ka(b)+" } })()         })";return d.createJavaScriptEvaluatorBlock(b)+
c}var c=/(<[a-z]+\d*(\s+(?!data-bind=)[a-z0-9\-]+(=(\"[^\"]*\"|\'[^\']*\'))?)*\s+)data-bind=(["'])([\s\S]*?)\5/gi,d=/<\!--\s*ko\b\s*([\s\S]*?)\s*--\>/g;return{mb:function(b,c){c.isTemplateRewritten(b)||c.rewriteTemplate(b,function(b){return a.Z.zb(b,c)})},zb:function(a,f){return a.replace(c,function(a,c,d,e,k,n,o){return b(o,c,f)}).replace(d,function(a,c){return b(c,"<\!-- ko --\>",f)})},Za:function(b){return a.s.na(function(c,d){c.nextSibling&&a.ya(c.nextSibling,b,d)})}}}();a.b("templateRewriting",
a.Z);a.b("templateRewriting.applyMemoizedBindingsToNextSibling",a.Z.Za);(function(){a.l={};a.l.i=function(a){this.i=a};a.l.i.prototype.text=function(){var b=a.a.o(this.i),b="script"===b?"text":"textarea"===b?"value":"innerHTML";if(0==arguments.length)return this.i[b];var c=arguments[0];"innerHTML"===b?a.a.Y(this.i,c):this.i[b]=c};a.l.i.prototype.data=function(b){if(1===arguments.length)return a.a.f.get(this.i,"templateSourceData_"+b);a.a.f.set(this.i,"templateSourceData_"+b,arguments[1])};a.l.M=function(a){this.i=
a};a.l.M.prototype=new a.l.i;a.l.M.prototype.text=function(){if(0==arguments.length){var b=a.a.f.get(this.i,"__ko_anon_template__")||{};b.ua===m&&b.da&&(b.ua=b.da.innerHTML);return b.ua}a.a.f.set(this.i,"__ko_anon_template__",{ua:arguments[0]})};a.l.i.prototype.nodes=function(){if(0==arguments.length)return(a.a.f.get(this.i,"__ko_anon_template__")||{}).da;a.a.f.set(this.i,"__ko_anon_template__",{da:arguments[0]})};a.b("templateSources",a.l);a.b("templateSources.domElement",a.l.i);a.b("templateSources.anonymousTemplate",
a.l.M)})();(function(){function b(b,c,d){for(var e,c=a.e.nextSibling(c);b&&(e=b)!==c;)b=a.e.nextSibling(e),(1===e.nodeType||8===e.nodeType)&&d(e)}function c(c,d){if(c.length){var e=c[0],i=c[c.length-1];b(e,i,function(b){a.xa(d,b)});b(e,i,function(b){a.s.Wa(b,[d])})}}function d(b,d,g,i,j){var j=j||{},k=j.templateEngine||e;a.Z.mb(g,k);g=k.renderTemplate(g,i,j);("number"!=typeof g.length||0<g.length&&"number"!=typeof g[0].nodeType)&&l(Error("Template engine must return an array of DOM nodes"));k=t;switch(d){case "replaceChildren":a.e.X(b,
g);k=p;break;case "replaceNode":a.a.Na(b,g);k=p;break;case "ignoreTargetNode":break;default:l(Error("Unknown renderMode: "+d))}k&&(c(g,i),j.afterRender&&j.afterRender(g,i.$data));return g}var e;a.ra=function(b){b!=m&&!(b instanceof a.t)&&l(Error("templateEngine must inherit from ko.templateEngine"));e=b};a.qa=function(b,c,g,i,j){g=g||{};(g.templateEngine||e)==m&&l(Error("Set a template engine before calling renderTemplate"));j=j||"replaceChildren";if(i){var k=i.nodeType?i:0<i.length?i[0]:r;return a.h(function(){var e=
c&&c instanceof a.z?c:new a.z(a.a.d(c)),o="function"==typeof b?b(e.$data):b,e=d(i,j,o,e,g);"replaceNode"==j&&(i=e,k=i.nodeType?i:0<i.length?i[0]:r)},r,{disposeWhen:function(){return!k||!a.a.fa(k)},disposeWhenNodeIsRemoved:k&&"replaceNode"==j?k.parentNode:k})}return a.s.na(function(d){a.qa(b,c,g,d,"replaceNode")})};a.Fb=function(b,e,g,i,j){function k(a,b){c(b,o);g.afterRender&&g.afterRender(b,a)}function n(c,e){var h="function"==typeof b?b(c):b;o=j.createChildContext(a.a.d(c));o.$index=e;return d(r,
"ignoreTargetNode",h,o,g)}var o;return a.h(function(){var b=a.a.d(e)||[];"undefined"==typeof b.length&&(b=[b]);b=a.a.aa(b,function(b){return g.includeDestroyed||b===m||b===r||!a.a.d(b._destroy)});a.a.Oa(i,b,n,g,k)},r,{disposeWhenNodeIsRemoved:i})};a.c.template={init:function(b,c){var d=a.a.d(c());if("string"!=typeof d&&!d.name&&(1==b.nodeType||8==b.nodeType))d=1==b.nodeType?b.childNodes:a.e.childNodes(b),d=a.a.Ab(d),(new a.l.M(b)).nodes(d);return{controlsDescendantBindings:p}},update:function(b,c,
d,e,j){c=a.a.d(c());e=p;"string"==typeof c?d=c:(d=c.name,"if"in c&&(e=e&&a.a.d(c["if"])),"ifnot"in c&&(e=e&&!a.a.d(c.ifnot)));var k=r;"object"===typeof c&&"foreach"in c?k=a.Fb(d||b,e&&c.foreach||[],c,b,j):e?(j="object"==typeof c&&"data"in c?j.createChildContext(a.a.d(c.data)):j,k=a.qa(d||b,j,c,b)):a.e.ha(b);j=k;(c=a.a.f.get(b,"__ko__templateSubscriptionDomDataKey__"))&&"function"==typeof c.A&&c.A();a.a.f.set(b,"__ko__templateSubscriptionDomDataKey__",j)}};a.g.D.template=function(b){b=a.g.W(b);return 1==
b.length&&b[0].unknown||a.g.wb(b,"name")?r:"This template engine does not support anonymous templates nested within its templates"};a.e.C.template=p})();a.b("setTemplateEngine",a.ra);a.b("renderTemplate",a.qa);(function(){a.a.O=function(b,c,d){if(d===m)return a.a.O(b,c,1)||a.a.O(b,c,10)||a.a.O(b,c,Number.MAX_VALUE);for(var b=b||[],c=c||[],e=b,f=c,h=[],g=0;g<=f.length;g++)h[g]=[];for(var g=0,i=Math.min(e.length,d);g<=i;g++)h[0][g]=g;g=1;for(i=Math.min(f.length,d);g<=i;g++)h[g][0]=g;for(var i=e.length,
j,k=f.length,g=1;g<=i;g++){j=Math.max(1,g-d);for(var n=Math.min(k,g+d);j<=n;j++)h[j][g]=e[g-1]===f[j-1]?h[j-1][g-1]:Math.min(h[j-1][g]===m?Number.MAX_VALUE:h[j-1][g]+1,h[j][g-1]===m?Number.MAX_VALUE:h[j][g-1]+1)}d=b.length;e=c.length;f=[];g=h[e][d];if(g===m)h=r;else{for(;0<d||0<e;){i=h[e][d];k=0<e?h[e-1][d]:g+1;n=0<d?h[e][d-1]:g+1;j=0<e&&0<d?h[e-1][d-1]:g+1;if(k===m||k<i-1)k=g+1;if(n===m||n<i-1)n=g+1;j<i-1&&(j=g+1);k<=n&&k<j?(f.push({status:"added",value:c[e-1]}),e--):(n<k&&n<j?f.push({status:"deleted",
value:b[d-1]}):(f.push({status:"retained",value:b[d-1]}),e--),d--)}h=f.reverse()}return h}})();a.b("utils.compareArrays",a.a.O);(function(){function b(a){if(2<a.length){for(var b=a[0],c=a[a.length-1],h=[b];b!==c;){b=b.nextSibling;if(!b)return;h.push(b)}Array.prototype.splice.apply(a,[0,a.length].concat(h))}}function c(c,e,f,h,g){var i=[],c=a.h(function(){var c=e(f,g)||[];0<i.length&&(b(i),a.a.Na(i,c),h&&h(f,c));i.splice(0,i.length);a.a.N(i,c)},r,{disposeWhenNodeIsRemoved:c,disposeWhen:function(){return 0==
i.length||!a.a.fa(i[0])}});return{xb:i,h:c}}a.a.Oa=function(d,e,f,h,g){for(var e=e||[],h=h||{},i=a.a.f.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")===m,j=a.a.f.get(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult")||[],k=a.a.T(j,function(a){return a.$a}),n=a.a.O(k,e),e=[],o=0,s=[],v=0,k=[],u=r,q=0,x=n.length;q<x;q++)switch(n[q].status){case "retained":var y=j[o];y.qb(v);v=e.push(y);0<y.P.length&&(u=y.P[y.P.length-1]);o++;break;case "deleted":j[o].h.A();b(j[o].P);a.a.v(j[o].P,
function(a){s.push({element:a,index:q,value:n[q].value});u=a});o++;break;case "added":for(var y=n[q].value,w=a.m(v),v=c(d,f,y,g,w),z=v.xb,v=e.push({$a:n[q].value,P:z,h:v.h,qb:w}),A=0,C=z.length;A<C;A++){var D=z[A];k.push({element:D,index:q,value:n[q].value});u==r?a.e.Ka(d,D):a.e.Fa(d,D,u);u=D}g&&g(y,z,w)}a.a.v(s,function(b){a.J(b.element)});f=t;if(!i){if(h.afterAdd)for(q=0;q<k.length;q++)h.afterAdd(k[q].element,k[q].index,k[q].value);if(h.beforeRemove){for(q=0;q<s.length;q++)h.beforeRemove(s[q].element,
s[q].index,s[q].value);f=p}}if(!f&&s.length){h=s[0].element.parentNode;for(q=0;q<s.length;q++)h.removeChild(s[q].element)}a.a.f.set(d,"setDomNodeChildrenFromArrayMapping_lastMappingResult",e)}})();a.b("utils.setDomNodeChildrenFromArrayMapping",a.a.Oa);a.q=function(){this.allowTemplateRewriting=t};a.q.prototype=new a.t;a.q.prototype.renderTemplateSource=function(b){var c=!(9>a.a.ja)&&b.nodes?b.nodes():r;if(c)return a.a.L(c.cloneNode(p).childNodes);b=b.text();return a.a.pa(b)};a.q.K=new a.q;a.ra(a.q.K);
a.b("nativeTemplateEngine",a.q);(function(){a.ma=function(){var a=this.vb=function(){if("undefined"==typeof jQuery||!jQuery.tmpl)return 0;try{if(0<=jQuery.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f){f=f||{};2>a&&l(Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later."));var h=b.data("precompiled");h||(h=b.text()||"",h=jQuery.template(r,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),
b.data("precompiled",h));b=[e.$data];e=jQuery.extend({koBindingContext:e},f.templateOptions);e=jQuery.tmpl(h,b,e);e.appendTo(document.createElement("div"));jQuery.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){document.write("<script type='text/html' id='"+a+"'>"+b+"<\/script>")};0<a&&(jQuery.tmpl.tag.ko_code={open:"__.push($1 || '');"},jQuery.tmpl.tag.ko_with={open:"with($1) {",close:"} "})};
a.ma.prototype=new a.t;var b=new a.ma;0<b.vb&&a.ra(b);a.b("jqueryTmplTemplateEngine",a.ma)})()}"function"===typeof require&&"object"===typeof exports&&"object"===typeof module?E(module.exports||exports):"function"===typeof define&&define.amd?define(["exports"],E):E(window.ko={});p;
})(window,document,navigator);
